package cn.whale.basic.query;


import lombok.Data;

/**
 * 基础查询对象
 */
@Data
public class BaseQuery {
    private String sortField;
    private String sortType;
    //关键字
    private String keyword;
    //有公共属性-分页
    private Integer page = 1; //当前页
    private Integer rows = 10; //每页显示多少条

    public String getKeyword() {
        return null == keyword || keyword.length() == 0? null :keyword.trim();
    }

    public void setKeyword(String keyword) {
        this.keyword = keyword;
    }

    public Integer getPage() {
        return page == null ? 1 : page;
    }

    public Integer getRows() {
        return rows == null ? 10 : rows;
    }

}
